def find_magic_index_direct(nums):  
    for i in range(len(nums)):  
        if nums[i] == i:  
            return i  
    return -1  
  
# 测试和结果  
print(find_magic_index_direct([0, 2, 3, 4, 5]))  
print(find_magic_index_direct([1, 1, 1]))        
print(find_magic_index_direct([-10, -5, 0, 3, 7, 9, 12])) 
print(find_magic_index_direct([0, 1, 2, 3, 4, 5, 6, 7, 8]))